import WakeUp from '@/libs/wake-up'
import { useTtsaStore } from '@/store/ttsa'
import { MODE } from '@/constants/ttsa'

const wakeUp = new WakeUp({
  onWakeUp: () => {
    const ttsa = useTtsaStore()
    if (ttsa.mode === MODE.QA) ttsa.pause()
    else ttsa.explainToQa()
  }
})

export default function useWakeUp() {
  return wakeUp
}